package com.tst.app.action;


import com.tst.app.utils.StsUtils;
import com.tst.app.vo.StsVo;
import com.tst.common.returnobj.ReturnObj;
import com.tst.common.returnobj.ReturnObjCode;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;


/**
 * sts令牌action
 * Created by John on 18/08/02.
 */
@RestController
@RequestMapping(value = "/sts")
@Api(value = "/sts", description = "sts令牌接口")
public class StsAction {

    @ApiOperation(value = "获取sts令牌")
    @RequestMapping(value = "/", method = RequestMethod.GET)
    public ReturnObj<StsVo> get() throws Exception {
        StsVo resultVo = StsUtils.get();
        return new ReturnObj<>(ReturnObjCode.SUCCESS, resultVo);
    }

}
